//
//  jxsSelectDueDateViewController.h
//  ToDoList
//
// This code file is apart of project "iPhone-ToDo-List" 
// (http://code.google.com/p/iphone-todo-list/)
//
// Copyright (c) 2009 Frank Villasenor
//
// Distributed under the terms of the Lesser GNU General Public License.
// A copy of the license should be with these files. If not, you 
// can retrieve a copy from http://www.gnu.org/licenses/lgpl-3.0.txt
// 

#import <UIKit/UIKit.h>


//
// This View/ViewController is technically a duplicate
// of jxsDatePickerView[Controller]. These are tightly coupled
// with the caller.  A new design needs to be done but for the
// purposes of the first version and the goal of "getting this working"
// I simple proceeded with this.
//
@interface jxsSelectDueDateViewController : UIViewController 
{
	UILabel *selectedDueDateLabel;
	UIDatePicker *datePicker;
	
	 //Holds the date that is set (not selected).
	// Used to pass the information between veiw controllers.
	// This would be updated with the selected date if the 
	// Update/confirm button was touched.
	NSDate *selectedDate;
	
	//
	// Pointers to the button so they can be styled.
	UIButton *cancelButton;
	UIButton *confirmButton;
	
	//
	// A pointer to the navController that has this viewController on the stack.
	UINavigationController *containingNavController;
	
	//
	// pointer to two UIToolbar items. One top, one bottom.
	UIToolbar *shortRangeToolBar;
	UIToolbar *longRangeToolBar;
}

@property (retain, nonatomic) IBOutlet UILabel *selectedDueDateLabel;
@property (retain, nonatomic) IBOutlet UIDatePicker *datePicker;

@property (retain) NSDate *selectedDate;
@property (retain) UINavigationController *containingNavController;

@property (retain, nonatomic) IBOutlet UIButton *cancelButton;
@property (retain, nonatomic) IBOutlet UIButton *confirmButton;

@property (retain, nonatomic) IBOutlet UIToolbar *shortRangeToolBar;
@property (retain, nonatomic) IBOutlet UIToolbar *longRangeToolBar;

- (IBAction)confirmedSelectionWithButton:(UIButton *)button;
- (IBAction)canceledSelectionWithButton:(UIButton *)button;

- (IBAction)selectedDateShortCut:(id)sender;
@end
